using System;
using System.Collections.Generic;
using ns26;
using ns27;
using Triton.Game.Mono;

namespace Triton.Game.Mapping
{
	[Attribute38("UpdateManager")]
	public class UpdateManager : MonoBehaviour
	{
		[Attribute38("UpdateManager.UpdateItem")]
		public class UpdateItem : MonoClass
		{
			public string fileName => method_4("fileName");

			public int size => method_2<int>("size");

			public string md5 => method_4("md5");

			public List<byte> bytes => method_3<Class250<byte>>("bytes")?.method_25();

			public UpdateItem(IntPtr address, string className)
				: base(address, className)
			{
			}

			public UpdateItem(IntPtr address)
				: this(address, "UpdateItem")
			{
			}
		}

		[Attribute38("UpdateManager.UpdateProgress")]
		public class UpdateProgress : MonoClass
		{
			public int numFilesToDownload => method_2<int>("numFilesToDownload");

			public int numFilesDownloaded => method_2<int>("numFilesDownloaded");

			public float downloadPercentage => method_2<float>("downloadPercentage");

			public bool showProgressBar => method_2<bool>("showProgressBar");

			public float maxPatchingBarDisplayTime => method_2<float>("maxPatchingBarDisplayTime");

			public UpdateProgress(IntPtr address, string className)
				: base(address, className)
			{
			}

			public UpdateProgress(IntPtr address)
				: this(address, "UpdateProgress")
			{
			}
		}

		public string m_error => method_4("m_error");

		public List<string> m_remoteUri => method_3<Class249>("m_remoteUri")?.method_25();

		public int m_remoteUriIndex => method_2<int>("m_remoteUriIndex");

		public int m_assetsVersion => method_2<int>("m_assetsVersion");

		public UpdateProgress m_updateProgress => method_3<UpdateProgress>("m_updateProgress");

		public bool m_updateIsRequired => method_2<bool>("m_updateIsRequired");

		public bool m_skipLoadingAssetBundle => method_2<bool>("m_skipLoadingAssetBundle");

		public UpdateManager(IntPtr address, string className)
			: base(address, className)
		{
		}

		public UpdateManager(IntPtr address)
			: this(address, "UpdateManager")
		{
		}

		public static UpdateManager Get()
		{
			return MonoClass.smethod_15<UpdateManager>(TritonHs.MainAssemblyPath, "", "UpdateManager", "Get", Array.Empty<object>());
		}

		public void Awake()
		{
			method_8("Awake");
		}

		public void OnDestroy()
		{
			method_8("OnDestroy");
		}

		public bool ContainsFile(string fileName)
		{
			return method_11<bool>("ContainsFile", new object[1] { fileName });
		}

		public string GetError()
		{
			return method_13("GetError");
		}

		public bool UpdateIsRequired()
		{
			return method_11<bool>("UpdateIsRequired", Array.Empty<object>());
		}

		public void SetLastFailedDOPVersion(bool success)
		{
			method_8("SetLastFailedDOPVersion", success);
		}

		public bool StopWaitingForUpdate()
		{
			return method_11<bool>("StopWaitingForUpdate", Array.Empty<object>());
		}

		public bool CurrentRegionIsCN()
		{
			return method_11<bool>("CurrentRegionIsCN", Array.Empty<object>());
		}

		public int GetTryCount()
		{
			return method_11<int>("GetTryCount", Array.Empty<object>());
		}

		public string DownloadURI(string fileName)
		{
			return method_13("DownloadURI", fileName);
		}

		public void MoveToNextCDN()
		{
			method_8("MoveToNextCDN");
		}

		public string CachedFileFolder()
		{
			return method_13("CachedFileFolder");
		}

		public string CachedFilePath(string fileName)
		{
			return method_13("CachedFilePath", fileName);
		}

		public void SetDownloadURI()
		{
			method_8("SetDownloadURI");
		}

		public void CallCallback()
		{
			method_8("CallCallback");
		}

		public UpdateProgress GetProgressForCurrentFile()
		{
			return method_14<UpdateProgress>("GetProgressForCurrentFile", Array.Empty<object>());
		}

		public void InitValues()
		{
			method_8("InitValues");
		}
	}
}
